#include "markupmanagertest.h"
#include "markupmanager.h"
#include "customyabettextmarkup.h"

//QTEST_MAIN(MarkupManagerTest)

void MarkupManagerTest::testConvertText() {
    MarkupManager manager;

    QString text = "some simple start text \n<b>bold text</b> and here is <i>italic</i> text.";
    QString expectedText = "some simple start text \n[b]bold text[/b] and here is [i]italic[/i] text.";

    YabetTextMarkup *fromMarkup = new CustomYabetTextMarkup("");
    YabetTextMarkup *toMarkup = new CustomYabetTextMarkup("./markups/vBulletinBB.properties");

    QString result = manager.convertText(text, fromMarkup, toMarkup);

    Q_ASSERT(result == expectedText);
}
